﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainFrm.Master" AutoEventWireup="true" CodeBehind="LoadStatus.aspx.cs" Inherits="Ewts.Storage.LoadStatus" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="EwtsConext" runat="server">
<div class="tab1">
  <input type="hidden" class="hidUname" runat="server" id="hidusrName" />
	<h2>Load进程</h2>
     处理地：
    <asp:DropDownList ID="dropGraphic"  runat="server" CssClass="dropGraphic">
<%--            <asp:ListItem Text="全部" Value="" Selected="True"></asp:ListItem>
            <asp:ListItem Text="上海" Value="上海"></asp:ListItem>
            <asp:ListItem Text="北京" Value="北京"></asp:ListItem>
            <asp:ListItem Text="广州" Value="广州"></asp:ListItem>
            <asp:ListItem Text="苏州" Value="苏州"></asp:ListItem>--%>
   </asp:DropDownList>
<br />
<div class="shadow">
       <%-- <asp:Repeater ID="rept" runat="server" onitemcommand="rept_ItemCommand" 
        onitemdatabound="rept_ItemDataBound">
      <HeaderTemplate>
 --%>
    <table id="tbColl" class="display" cellpadding="0" cellspacing="0" border="0" style="width:100%;">
 
      <thead>
 
 <tr>
        <th  scope="col" class="style1">序号</th>
        <th scope="col" class="style1">LoadNum</th>
        <th  scope="col" class="style1">CJO</th>
        <th  scope="col" class="style1">客户编码</th>
        <th  scope="col" class="style1">客户名称</th>
        <th  scope="col" class="style1">货物件数</th>
         <th  scope="col" class="style1">特殊要求</th>
         <th  scope="col" class="style1">工人数</th>
       <th  scope="col" class="style1">状态</th>
       <th  scope="col" class="style1">授权人</th>
       <th>操作</th>
      </tr> 
      </thead>
 
      <tbody>
 
  <%--</HeaderTemplate>
 
  <ItemTemplate>
 
    <tr>
      <td><%# Container.ItemIndex + 1%></td>
      <td><%# Eval("l_loadnumno")%></td>
      <td><%# Eval("c_cjonno")%></td>
      <td><%# Eval("cum_code")%></td> 
      <td><%# Eval("cum_name")%></td>  
      <td><%# Eval("v_numberestimate")%></td> 

      <td title='<%# Eval("v_peculiarrequire") %>'> <%# GetSubString(Eval("v_peculiarrequire").ToString(), 5)%></td> 
      <td><%# Eval("v_workcount")%></td>
      <td><%# Eval("c_status") %>  </td>
      <td><asp:LinkButton ID="linkAgree" ForeColor="Blue"  runat="server" CommandName="批准" Text="批准撤销" ToolTip="批准撤销，回到待授权状态"  Enabled='<%# GetEnable(Eval("c_status").ToString())%>' CommandArgument='<%#Eval("c_id")%>'/></td>
    </tr>
 
  </ItemTemplate>
 
  <FooterTemplate>--%>
 
    </tbody>
 
    </table>
 
  <%--</FooterTemplate>


    </asp:Repeater>--%>
</div>
    <script type="text/javascript">

        $(document).ready(function () {

     

            var mtable = $('#tbColl').dataTable({ "oLanguage": { "sUrl": "/jquery/jquery.dataTable.cn.txt" },
                "bJQueryUI": true,
                "sPaginationType": "full_numbers",
                'bPaginate': true,
                "bProcessing": true,
                "iDisplayLength": 25,
                "bDestory": true,
                "columns": [
                    { "data": "indexnum" },
                    { "data": "l_loadnumno" },
                    { "data": "c_cjonno" },
                    { "data": "cum_code" },
                    { "data": "cum_name" },
                     { "data": "v_numberestimate" },
                     { "data": "v_peculiarrequire" },
                     { "data": "v_workcount" },
                    { "data": "cjostatus" },
                    {"data":"authname"},
                    { "data": "cjoagree" }            
                  ],
                "sAjaxSource": "/ashx/pageJuqery.ashx?pagetype=lstatus&uname=" + $(".hidUname").val() + "&city=" + encodeURI($(".dropGraphic").val()),
                "bServerSide": true
            });

            $('.dropGraphic').change(function () {

                mtable.fnReloadAjax("/ashx/pageJuqery.ashx?pagetype=lstatus&city=" + encodeURI($(".dropGraphic").val()));
            });



        });

        function CXSQ(obj,cjoid) {
            if (confirm("确认要撤销申请吗？")) {
                $.ajax({
                    type: "post",
                    url: "/ashx/cjoOper.ashx?opettype=loadstatus&cjoid=" + cjoid,
                    data: { d: "3" },
                    success: function (msg) {
                        if (msg == 1) {
                            alert('已批准，回到待授权');
                            var strhtml = "<a style='color:#ccc;'>批准撤销</a>";
                            $(obj).html(strhtml);
                        }
                        else {
                        }
                    }
                });
            }

        }

 
</script>
  
</div>
</asp:Content>
